home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6273 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  571 b 

  1. From: Tendrils@msn.com (kelvin  )
  2. Subject: RE: Placement-new with virtual function problem on HP
  3. Date: 8 Feb 96 04:19:00 -0800
  4. References: <4faium$2c6@hermes.oc.com>
  5. Message-ID: <00001a81+00009ca3@msn.com>
  6. Path: news.msn.com!msn.com
  7. Newsgroups: comp.lang.c++
  8. Organization: The Microsoft Network (msn.com)
  9.  
  10. Your overridden new may be hiding the global new .... which explain 
  11. why it works when you revert back .... try this (from effective c++ 
  12. by Scott Meyers)...
  13.  
  14.  
  15. In the test class, add this function
  16.  
  17. void *operator new(size_t size)
  18. { return ::new char[size];}
  19.  
  20. later
  21.